package com.xxxy.zyq.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.xxxy.zyq.MonitorBlockHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController

public class MonitorController {
    @GetMapping("/monitor/hello")
    @SentinelResource(value = "helloResource",blockHandler = "helloBlockHandeler",blockHandlerClass = MonitorBlockHandler.class)
//    @GetMapping("/hello")

    public String hello() {
        return "hello,sentinel";
    }

}
